﻿using System;
using System.Collections.Generic;
using System.Linq;
using Missbot.Common;
using Missbot.Core.Base;
using Dolany.UtilityTool;
using JetBrains.Annotations;
using Missbot.AIModule.Base;
using Missbot.AIModule.Gaming.Gift;
using Missbot.AIModule.OnlineStore;
using Missbot.AIModule.Pet;
using Missbot.AIModule.Pet.Cooking;
using Missbot.AIModule.Vip;
using Missbot.Core.Cache;
using Missbot.Model.MsgInfos;

namespace Missbot.AIModule.Gaming.Shopping
{
    [UsedImplicitly]
    public class ShoppingMod : IAIModule
    {
        public override string Name => "商店";

        #region Svcs

        public HonorSvc HonorSvc { get; set; }
        public WaiterSvc WaiterSvc { get; set; }
        public DailyVipShopSvc DailyVipShopSvc { get; set; }
        public GiftSvc GiftSvc { get; set; }
        public PetLevelSvc PetLevelSvc { get; set; }
        public CookingDietSvc CookingDietSvc { get; set; }

        #endregion

        private const int RebornHonorLimit = 7;

        [ModuleEnter(Command = "贩卖 出售 贩卖物品 出售物品", Description = "贩卖物品或者成就", DailyLimit = 8, SyntaxHint = "[物品名]")]
        public bool Sell(InboxSession session, string name)
        {
            if (OSPersonBuffDA.CheckBuff(session.User.ID, "快晴"))
            {
                session.SendBack("你无法进行该操作！(快晴)");
                return false;
            }

            var item = HonorSvc.FindItem(name);
            if (item != null)
            {
                return SellItem(session, item);
            }

            if (HonorSvc.FindHonor(name) != null)
            {
                return DoSellHonor(session, name);
            }

            session.SendBack("未查找到相关物品或成就！");
            return false;
        }

        private bool SellItem(InboxSession session, DriftBottleItemModel item, int count = 1)
        {
            var record = ItemCollectionDA.Get(session.User.ID);
            if (!record.CheckItem(item.Name, count))
            {
                session.SendBack("你的背包里没有足够多的该物品！");
                return false;
            }

            var price = HonorSvc.GetItemPrice(item, session.User.ID);
            var msg = $"贩卖 {item.Name}*{count} 将获得 {(price * count).CurencyFormat()}，是否确认贩卖？";
            if (!WaiterSvc.WaitForConfirm(session, msg))
            {
                session.SendBack("交易取消！");
                return false;
            }

            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            TransHelper.SellItemToShop(item.Name, osPerson, count);
            osPerson.Update();

            session.SendBack($"贩卖成功！你当前拥有金币 {osPerson.Golds.CurencyFormat()}");
            return true;
        }

        private bool DoSellHonor(InboxSession session, string honorName)
        {
            var colleRec = ItemCollectionDA.Get(session.User.ID);
            if (colleRec.HonorCollections.IsNullOrEmpty())
            {
                session.SendBack("你尚未拥有任何物品！");
                return false;
            }

            var items = HonorSvc.FindHonor(honorName).Items;
            var honorCollection = colleRec.HonorCollections;
            if (!honorCollection.ContainsKey(honorName) || honorCollection[honorName].Items.Count < items.Count)
            {
                session.SendBack("你尚未集齐该成就下的所有物品！");
                return false;
            }

            var price = HonorSvc.GetHonorPrice(honorName, session.User.ID);
            var msg = $"贩卖此成就将获得 {price.CurencyFormat()}，是否确认贩卖？";
            if (!WaiterSvc.WaitForConfirm(session, msg))
            {
                session.SendBack("交易取消！");
                return false;
            }

            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            TransHelper.SellHonorToShop(colleRec, honorName, osPerson);

            colleRec.Update();
            osPerson.Update();

            session.SendBack($"贩卖成功！你当前拥有金币 {osPerson.Golds.CurencyFormat()}");
            return true;
        }

        [ModuleEnter(Command = "贩卖成就 出售成就", Description = "贩卖指定成就", DailyLimit = 8, SyntaxHint = "[成就名]")]
        public bool SellHonor(InboxSession session, string name)
        {
            if (OSPersonBuffDA.CheckBuff(session.User.ID, "快晴"))
            {
                session.SendBack("你无法进行该操作！(快晴)");
                return false;
            }

            if (HonorSvc.FindHonor(name) != null)
            {
                return DoSellHonor(session, name);
            }

            session.SendBack("未查找到相关成就！");
            return false;
        }

        [ModuleEnter(Command = "贩卖 出售", Description = "批量贩卖物品", DailyLimit = 5, SyntaxHint = "[物品名] [数量]")]
        public bool SellMulti(InboxSession session, string name, int count)
        {
            if (OSPersonBuffDA.CheckBuff(session.User.ID, "快晴"))
            {
                session.SendBack("你无法进行该操作！(快晴)");
                return false;
            }

            if (count <= 0)
            {
                session.SendBack("错误的物品数量！");
                return false;
            }

            var item = HonorSvc.FindItem(name);
            if (item != null)
            {
                SellItem(session, item, count);
                return true;
            }

            session.SendBack("未查找到相关物品！");
            return false;
        }

        [ModuleEnter(Command = "贩卖多余物品 出售多余物品", Description = "一键贩卖自己多余的物品", DailyLimit = 2)]
        public bool SellRedundant(InboxSession session)
        {
            if (OSPersonBuffDA.CheckBuff(session.User.ID, "快晴"))
            {
                session.SendBack("你无法进行该操作！(快晴)");
                return false;
            }

            var record = ItemCollectionDA.Get(session.User.ID);
            var ics = record.HonorCollections.Values.SelectMany(hc => hc.Items.Where(p => p.Value > 1)).ToList();
            if (ics.IsNullOrEmpty())
            {
                session.SendBack("你没有任何多余的物品！");
                return false;
            }

            var ictm = ics.Select(p => new
            {
                p.Key,
                Count = p.Value - 1,
                IsLimit = HonorSvc.IsLimitItem(p.Key),
                Price = HonorSvc.GetItemPrice(HonorSvc.FindItem(p.Key), session.User.ID)
            }).ToList();
            var msg = $"你即将贩卖{ictm.Sum(i => i.Count)}件物品，" +
                      $"其中有{ictm.Count(i => i.IsLimit)}件限定物品，" +
                      $"共价值{ictm.Sum(p => p.Price * p.Count).CurencyFormat()}，是否继续？";
            if (!WaiterSvc.WaitForConfirm(session, msg))
            {
                session.SendBack("操作取消！");
                return false;
            }

            foreach (var ic in ictm)
            {
                record.ItemConsume(ic.Key, ic.Count);
            }

            record.Update();

            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            osPerson.Golds += ictm.Sum(p => p.Price * p.Count);
            osPerson.Update();

            session.SendBack($"贩卖成功，你当前拥有{osPerson.Golds.CurencyFormat()}！");
            return true;
        }

        [ModuleEnter(Command = "逛商店 .shopping", Description = "获取当前售卖的商品信息")]
        public bool ShopInfo(InboxSession session)
        {
            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            var golds = osPerson.Golds;

            var sellItems = TransHelper.GetDailySellItems();
            var record = ItemCollectionDA.Get(session.User.ID);

            var buffer = new OutputBuffer(session);
            buffer.Add("今日售卖的商品：");
            buffer.Add(sellItems.Select(si => $"{si.Name}({HonorSvc.FindHonorFullName(si.Name)})({record.GetCount(si.Name)})({si.Attr})：{si.Price.CurencyFormat()}"));
            buffer.Add($"你当前持有 {golds.CurencyFormat()}");
            buffer.Send();
            return true;
        }

        [ModuleEnter(Command = "稀有商店", Description = "逛稀有商店(每日随机开放三个小时)")]
        public bool ShopInfo_Rare(InboxSession session)
        {
            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            var golds = osPerson.Golds;

            var todayRec = DailySellItemRareDA.GetToday();
            var tomorrowRec = DailySellItemRareDA.GetTomorrow();
            if (todayRec.IsOver)
            {
                session.SendBack($"稀有商店休息中~\n下次开放时间：明天 {tomorrowRec.Hour}:00:00 ~ {tomorrowRec.Hour + 3}:00:00");
                return false;
            }

            if (todayRec.IsBefore)
            {
                session.SendBack($"稀有商店休息中~\n下次开放时间：今天 {todayRec.Hour}:00:00 ~ {todayRec.Hour + 3}:00:00");
                return false;
            }

            var sellItems = todayRec.Items;
            var record = ItemCollectionDA.Get(session.User.ID);

            var buffer = new OutputBuffer(session);
            buffer.Add("当前售卖的商品：");
            buffer.Add(sellItems.Select(si => $"{si.Name}({HonorSvc.FindHonorFullName(si.Name)})({record.GetCount(si.Name)})({si.Attr})：{si.Price.CurencyFormat()}"));
            buffer.Add($"你当前持有 {golds.CurencyFormat()}");
            buffer.Send();
            return true;
        }

        [ModuleEnter(Command = "购买 购买物品", Description = "购买指定（在商店中售卖的）商品", DailyLimit = 7, SyntaxHint = "[物品名]")]
        public bool Buy(InboxSession session, string name)
        {
            var vipSvc = DailyVipShopSvc[name];
            if (vipSvc != null)
            {
                DailyVipShopSvc.Serve(session, name);
                return false;
            }

            if (OSPersonBuffDA.CheckBuff(session.User.ID, "快晴"))
            {
                session.SendBack("你无法进行该操作！(快晴)");
                return false;
            }

            var sellingItems = TransHelper.GetDailySellItems().ToList();
            var todayRec = DailySellItemRareDA.GetToday();
            if (DateTime.Now.Hour >= todayRec.Hour && DateTime.Now.Hour <= todayRec.Hour + 2)
            {
                sellingItems.AddRange(todayRec.Items);
            }

            var sellItem = sellingItems.FirstOrDefault(si => si.Name == name);
            if (sellItem == null)
            {
                session.SendBack("此物品未在商店中售卖！");
                return false;
            }

            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            if (osPerson.Golds < sellItem.Price)
            {
                session.SendBack("你持有的金币不足以购买此物品！");
                return false;
            }

            var price = OSPersonBuffDA.CheckBuff(session.User.ID, "极光") ? sellItem.Price * 80 / 100 : sellItem.Price;
            if (!WaiterSvc.WaitForConfirm_Gold(session, price))
            {
                session.SendBack("交易取消！");
                return false;
            }

            var record = ItemCollectionDA.Get(session.User.ID);
            var incomeMsg = record.ItemIncome(sellItem.Name);

            OSPersonDA.GoldConsume(osPerson.UserID, price);

            session.SendBack($"{incomeMsg}\n购买成功！你当前剩余的金币为 {(osPerson.Golds - sellItem.Price).CurencyFormat()}");
            return true;
        }

        [ModuleEnter(Command = "交易", Description = "向另一个成员求购一个物品/菜肴，并指定价格(系统将收取5%的手续费)", DailyLimit = 5, SyntaxHint = "[@用户名] [物品名/菜肴名] [价格]")]
        public bool DealWith(InboxSession session, InstanceUser aimUser, string name, int price)
        {
            if (OSPersonBuffDA.CheckBuff(session.User.ID, "快晴"))
            {
                session.SendBack("你无法进行该操作！(快晴)");
                return false;
            }

            if (aimUser.ID == session.User.ID)
            {
                session.SendBack("你无法和自己交易！");
                return false;
            }

            if (price <= 0)
            {
                session.SendBack("价格异常！");
                return false;
            }

            if (HonorSvc.FindItem(name) != null)
            {
                return DealItem(session, name, aimUser, price);
            }

            if (CookingDietSvc[name] != null)
            {
                return DealDiet(session, name, aimUser, price);
            }

            session.SendBack("未查找到相关物品信息！");
            return false;
        }

        private bool DealItem(InboxSession session, string name, InstanceUser aimUser, int price)
        {
            var aimRecord = ItemCollectionDA.Get(aimUser.ID);
            if (!aimRecord.CheckItem(name))
            {
                session.SendBack("对方没有该物品！");
                return false;
            }

            var originPrice = HonorSvc.GetItemPrice(HonorSvc.FindItem(name), session.User.ID);
            if (originPrice > price)
            {
                session.SendBack($"收购价格无法低于系统价格({originPrice.CurencyFormat()})！");
                return false;
            }

            var sourceOSPerson = OSPersonDA.GetPerson(session.User.ID);
            var fee = OSPersonBuffDA.CheckBuff(session.User.ID, "苍天") ? 0 : price / 20;
            if (sourceOSPerson.Golds < price + fee)
            {
                session.SendBack("你没有足够的金币来支付！");
                return false;
            }

            var count = aimRecord.GetCount(name);
            var msg = $"收到来自 @{session.User.FullUserName} 的交易请求：\n" +
                      $"希望得到的物品：{name}\n" +
                      $"价格：{price.CurencyFormat()}({originPrice.CurencyFormat()})\n" +
                      $"你当前持有：{count}个，是否确认交易？";
            var aimUserDto = new InboxSession
            {
                Group = session.Group,
                User = aimUser,
                Channel = session.Channel
            };
            if (!WaiterSvc.WaitForConfirm(aimUserDto, msg, 10))
            {
                session.SendGroup(aimUser, "交易取消！");
                return false;
            }

            aimRecord.ItemConsume(name);
            aimRecord.Update();

            var sourceRecord = ItemCollectionDA.Get(session.User.ID);
            var content = sourceRecord.ItemIncome(name);
            if (!string.IsNullOrEmpty(content))
            {
                session.SendBack(content);
            }

            var aimOSPerson = OSPersonDA.GetPerson(aimUser.ID);
            sourceOSPerson.Golds -= price + fee;
            aimOSPerson.Golds += price;

            sourceOSPerson.Update();
            aimOSPerson.Update();

            aimUserDto.SendBack($"交易完毕！你获得了 {price.CurencyFormat()}!\n当前剩余金币：{aimOSPerson.Golds.CurencyFormat()}");
            return true;
        }

        private bool DealDiet(InboxSession session, string name, InstanceUser AimUser, int price)
        {
            var aimDietRec = CookingRecordDA.Get(AimUser.ID);
            if (!aimDietRec.CheckDiet(name))
            {
                session.SendBack("对方没有该菜肴！");
                return false;
            }

            var dietModel = CookingDietSvc[name];
            if (dietModel.EstimatedPrice() < price)
            {
                session.SendBack($"交易价格不能低于该菜肴的成本价格({dietModel.EstimatedPrice().CurencyFormat()})！");
                return false;
            }

            var sourceOSPerson = OSPersonDA.GetPerson(session.User.ID);
            var fee = OSPersonBuffDA.CheckBuff(session.User.ID, "苍天") ? 0 : price / 20;
            if (sourceOSPerson.Golds < price + fee)
            {
                session.SendBack("你没有足够的金币来支付！");
                return false;
            }

            var count = aimDietRec.CookedDietDic[name];
            var msg = $"收到来自 {session.User.FullUserName} 的交易请求：\n" +
                      $"希望得到的菜肴：{name}\n" +
                      $"价格：{price.CurencyFormat()}({dietModel.EstimatedPrice().CurencyFormat()})\n" +
                      $"你当前持有：{count}个，是否确认交易？";
            var aimUserDto = new InboxSession
            {
                Group = session.Group,
                User = AimUser,
                Channel = session.Channel
            };
            if (!WaiterSvc.WaitForConfirm(aimUserDto, msg))
            {
                session.SendGroup(AimUser, "交易取消！");
                return false;
            }

            var sourceDietRec = CookingRecordDA.Get(session.User.ID);
            sourceDietRec.AddDiet(name);
            sourceDietRec.Update();

            aimDietRec.DietConsume(name);
            aimDietRec.Update();

            sourceOSPerson.Golds -= price + fee;
            sourceOSPerson.Update();

            var aimOSPerson = OSPersonDA.GetPerson(AimUser.ID);
            aimOSPerson.Golds += price;
            aimOSPerson.Update();

            session.SendGroup(AimUser, "交易完毕！");
            return true;
        }

        [ModuleEnter(Command = "我的状态", Description = "查看自己的当前的状态（包括金币，物品数量，buff等）")]
        public bool MyStatus(InboxSession session)
        {
            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            var itemRecord = ItemCollectionDA.Get(session.User.ID);
            var glamourRecord = GlamourRecordDA.Get(session.Group.ID, session.User.ID);

            var normalHonors = itemRecord.HonorCollections.Where(h => h.Value.Type == HonorType.Normal).ToList();

            var allNormalItems = HonorSvc.HonorList.Where(h => !h.IsLimit).SelectMany(h => h.Items).Select(p => p.Name).ToArray();
            var upgradableItems = normalHonors.Select(p => p.Value)
                                              .SelectMany(h => h.Items.Select(i => new { name = i.Key, count = i.Value }))
                                              .Where(p => p.count >= osPerson.Level)
                                              .Select(h => h.name)
                                              .ToList();

            var buffer = new OutputBuffer(session);
            if (!osPerson.HonorNames.IsNullOrEmpty())
            {
                buffer.Add(string.Join("", osPerson.HonorNames.Select(h => $"【{h}】")));
            }

            buffer.AddPair("等级", osPerson.EmojiLevel);
            buffer.AddPair("经验值", $"{upgradableItems.Count}/{allNormalItems.Length}{(upgradableItems.Count == allNormalItems.Length ? "(可转生)" : string.Empty)}");

            buffer.AddPair("金币", osPerson.Golds.CurencyFormat());
            if (osPerson.Diamonds > 0)
            {
                buffer.AddPair("钻石", osPerson.Diamonds.CurencyFormat("Diamond"));
            }

            buffer.AddPair("物品数量", itemRecord.TotalItemCount().ToString());
            buffer.AddPair("成就数量", $"{itemRecord.HonorList()?.Count ?? 0}");

            if (glamourRecord.Glamour > 0)
            {
                buffer.AddPair("魅力值", glamourRecord.Glamour.ToString());
            }

            var buffs = OSPersonBuffDA.Get(session.User.ID);
            if (!buffs.IsNullOrEmpty())
            {
                buffer.Add("Buff列表：");
                buffer.Add(buffs.Select(b => $"{b.Name}：{b.Description}（{b.ExpiryTime}）"));
            }

            buffer.Send();
            return true;
        }

        [ModuleEnter(Command = "赠送", Description = "赠送一件物品给其他成员，需要支付5%的手续费", DailyLimit = 1, SyntaxHint = "[@用户名] [物品名]")]
        public bool Present(InboxSession session, InstanceUser aimUser, string name)
        {
            var sourceRecord = ItemCollectionDA.Get(session.User.ID);
            if (!sourceRecord.CheckItem(name))
            {
                session.SendBack("你没有此物品");
                return false;
            }

            var itemModel = HonorSvc.FindItem(name);
            var price = HonorSvc.GetItemPrice(itemModel, session.User.ID) * 5 / 100;
            if (!WaiterSvc.WaitForConfirm_Gold(session, price))
            {
                session.SendBack("操作取消!");
                return false;
            }

            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            osPerson.Golds -= price;
            osPerson.Update();

            sourceRecord.ItemConsume(name);
            sourceRecord.Update();

            var aimRecord = ItemCollectionDA.Get(aimUser.ID);
            var msg = aimRecord.ItemIncome(name);

            session.SendBack("赠送成功！");

            var res = $"你收到一份赠礼：{name} * 1";
            if (!string.IsNullOrEmpty(msg))
            {
                res += $"\n{msg}";
            }

            new InboxSession { Group = session.Group, Channel = session.Channel, User = aimUser }.SendBack(res);

            return true;
        }

        [ModuleEnter(Command = "资产评估", Description = "评估自己的资产情况")]
        public bool AssertCalculate(InboxSession session)
        {
            var osPerson = OSPersonDA.GetPerson(session.User.ID);
            if (osPerson.Golds < 50)
            {
                session.SendBack($"你的金币余额不足({osPerson.Golds.CurencyFormat()}/{50.CurencyFormat()})!");
                return false;
            }

            if (!WaiterSvc.WaitForConfirm_Gold(session, 50))
            {
                session.SendBack("操作取消！");
                return false;
            }

            osPerson.Golds -= 50;
            osPerson.Update();

            var resultDic = new Dictionary<string, int> { { "金币资产", osPerson.Golds } };

            var itemRecord = ItemCollectionDA.Get(session.User.ID);
            if (!itemRecord.HonorCollections.IsNullOrEmpty())
            {
                var itemAssert = itemRecord.AssertToGold();

                resultDic.Add("物品资产", itemAssert);
            }

            if (!osPerson.GiftDic.IsNullOrEmpty())
            {
                var giftsMaterialDic = osPerson.GiftDic.SelectMany(p => GiftSvc[p.Key].MaterialDic);
                var giftAssert = giftsMaterialDic.Sum(g => HonorSvc.FindItem(g.Key).Price * g.Value);
                resultDic.Add("礼物资产", giftAssert);
            }

            var pet = PetRecordDA.Get(session.User.ID);
            if (pet.Level > 0 || pet.Exp > 0)
            {
                var petAssert = PetLevelSvc.ExpToGolds(pet.Level, pet.Exp);
                resultDic.Add("宠物资产", petAssert);
            }

            var dietRec = CookingRecordDA.Get(session.User.ID);
            if (!dietRec.LearndDietMenu.IsNullOrEmpty() || !dietRec.CookedDietDic.IsNullOrEmpty() || !dietRec.FlavoringDic.IsNullOrEmpty())
            {
                var dietAssert = dietRec.LearndDietMenu.Sum(menu =>
                                                                HonorSvc.FindHonor(CookingDietSvc[menu].ExchangeHonor).Items.Sum(item => item.Price));
                dietAssert += dietRec.CookedDietDic.Sum(diet => CookingDietSvc[diet.Key].EstimatedPrice() * diet.Value);
                dietAssert += dietRec.FlavoringDic.Sum(p => p.Value) * 20;
                resultDic.Add("烹饪资产", dietAssert);
            }

            var buffer = new OutputBuffer(session);
            buffer.Add("请查阅你的资产评估报告：");
            buffer.Add(resultDic.Select(rd => $"{rd.Key}:{rd.Value.CurencyFormat()}"));
            buffer.Add($"总资产:{resultDic.Sum(p => p.Value).CurencyFormat()}");
            buffer.Send();
            return true;
        }

        [ModuleEnter(Command = "灵魂转生", Description = "献祭所有物品(*当前等级)，等级+1，获取一个自定义荣誉称号")]
        public bool Reborn(InboxSession session)
        {
            var itemColl = ItemCollectionDA.Get(session.User.ID);
            if (itemColl.HonorCollections.IsNullOrEmpty())
            {
                session.SendBack("你尚未集齐所有非限定物品！");
                return false;
            }

            var osPerson = OSPersonDA.GetPerson(session.User.ID);

            var normalHonors = itemColl.HonorCollections.Where(h => h.Value.Type == HonorType.Normal).ToList();
            var items = normalHonors.SelectMany(h => h.Value.Items.Select(i => new { name = i.Key, count = i.Value }))
                                    .Where(p => p.count >= osPerson.Level)
                                    .Select(h => h.name)
                                    .ToList();

            var allItems = HonorSvc.HonorList.Where(h => !h.IsLimit).SelectMany(h => h.Items).Select(p => p.Name);
            if (items.Count != allItems.Count())
            {
                session.SendBack("你尚未集齐所有非限定物品(*当前等级)！");
                return false;
            }

            var response = WaiterSvc.WaitForInformation(session, $"请输入想获取的荣誉称号名称(不能超过{RebornHonorLimit}个字)",
                                                        info => info.User.ID == session.User.ID && (session.Group == null || info.Group.ID == session.Group.ID) &&
                                                                info.Text is { Length: <= RebornHonorLimit }, 10);
            if (response == null)
            {
                session.SendBack("操作取消！");
                return false;
            }

            var honorName = response.Text;
            if (osPerson.HonorNames.Contains(honorName))
            {
                session.SendBack("你已经获取了该荣誉称号，操作取消！");
                return false;
            }

            foreach (var honor in normalHonors.Select(p => p.Key))
            {
                for (var i = 0; i < osPerson.Level; i++)
                {
                    TransHelper.SellHonorToShop(itemColl, honor, osPerson);
                }
            }

            osPerson.Level++;
            osPerson.HonorNames.Add(honorName);

            itemColl.Update();
            osPerson.Update();

            session.SendBack($"恭喜【{honorName}】，转生成功！");
            return true;
        }
    }
}